﻿using System.Linq;
using System.Security.Principal;

namespace ActivateYourGlutes.Model.Internal
{
    public partial class ActivateYourGlutesEntities
    {
        public Account CurrentAccount(IPrincipal user)
        {
            var username = user.Identity.Name;
            return Accounts.Where(ac => ac.Username == username).FirstOrDefault();
        }
    }
}
